<%@ page import="java.util.*,com.db.tracker.vo.*,java.util.*,com.db.tracker.util.*,java.text.*,java.io.*"%>
<%@ page import="com.db.tracker.vo.ReleaseVO"%>
<%try {
				System.out.println("XXXXXXXXXXXXXXXXX START LOADING JSP PAGE XXXXXXXXXXXXXXXX");
				session = request.getSession();
			//	System.out.println("user_id..main"+ session.getAttribute("USER_ID"));

				//	if(false){
					if (session.getAttribute("USER_ID") == null || !((String) session.getAttribute("SESSION_ID")).equals(session.getId())) {


					try {
						response.sendRedirect("LoginPage.jsp");
					} catch (IOException ioe) {
						ioe.printStackTrace();
					}

				} else { 

				
					String usergroupname = (String) session.getAttribute("USER_GROUP_NAME");
					
					DBUtil dbutil = new DBUtil(getServletContext());
					ReleaseVO crobjbean = null;

					Vector relNameVector = new Vector();
					Vector RelObjSearchCRDetail = null;
					
					String userid = (String)session.getAttribute("USER_ID")==null?"":(String)session.getAttribute("USER_ID");
					String UpdateButton = (String)request.getParameter("UpdateButton")==null?"":(String)request.getParameter("UpdateButton");
					String searchButton = (String)request.getParameter("searchButton")==null?"":(String)request.getParameter("searchButton");
					String crObjStatus = (String)request.getParameter("crObjStatus")==null?(request.getParameter("hiddencrObjStatus")==null?"":(String)request.getParameter("hiddencrObjStatus")):(String)request.getParameter("crObjStatus");
					String releaseName = (String)request.getParameter("releaseName")==null?"":(String)request.getParameter("releaseName");
					String reason = (String)request.getParameter("reason")==null?"":(String)request.getParameter("reason");
					String acceptButton = (String)request.getParameter("acceptButton")==null?"":(String)request.getParameter("acceptButton");
					String rejectButton = (String)request.getParameter("rejectButton")==null?"":(String)request.getParameter("rejectButton");
					String nxtButton = (String)request.getParameter("nxtButton")==null?"":(String)request.getParameter("nxtButton");
				
			//		System.out.println("Next Button" +nxtButton);

					int maxcrobj = 0;
					int crobjkey = Integer.parseInt((String)request.getParameter("crobjkey")==null?"0":(String)request.getParameter("crobjkey"));
					int relObjKey = Integer.parseInt((String)request.getParameter("relObjKey")==null?"0":(String)request.getParameter("relObjKey"));
					
					
						
					relNameVector = (Vector)session.getAttribute("REL-NAME-VECTOR");	

					if(request.getParameter("releaseName")==null){
						session.removeAttribute("SEARCHED-CR-OBJECTS");					
					}
				
					if(relNameVector == null){
					
						session.removeAttribute("REL-NAME-VECTOR");
						relNameVector = dbutil.getAllReleaseName();
						session.setAttribute("REL-NAME-VECTOR", relNameVector);
					}

					if(searchButton.equals("Search")){
			
						session.removeAttribute("SEARCHED-CR-OBJECTS");
						RelObjSearchCRDetail = dbutil.getSearchedCRObjects(releaseName, crObjStatus);
						session.setAttribute("SEARCHED-CR-OBJECTS", RelObjSearchCRDetail);
						maxcrobj = RelObjSearchCRDetail.size();
					}

			//		System.out.println("acceptButton >>"+acceptButton);
					if(acceptButton.equals("Accept")){
							// System.out.println("inside accept 1");
							dbutil.SaveCRBySupport(relObjKey, "Y", reason, userid);

							session.removeAttribute("SEARCHED-CR-OBJECTS");
							RelObjSearchCRDetail = dbutil.getSearchedCRObjects(releaseName, crObjStatus);
							session.setAttribute("SEARCHED-CR-OBJECTS", RelObjSearchCRDetail);
							maxcrobj = RelObjSearchCRDetail.size();
							// System.out.println("inside accept 2");
							//// changes for sending emails starts here
						
							String sender ="";
							String mailserver="";
							String header ="";
											

						   ReleaseVO mailBean = new ReleaseVO();

						   // CR details
						   // System.out.println("inside accept 3");
						   
						   mailBean.setAppScreenName((String)request.getParameter("hiddenAppScreenName")==null?"":request.getParameter("hiddenAppScreenName"));
						   mailBean.setAppReportName((String)request.getParameter("hiddenAppReportName")==null?"":request.getParameter("hiddenAppReportName"));
						   
						   mailBean.setPurpose((String)request.getParameter("hiddenPurpose")==null?"":request.getParameter("hiddenPurpose"));
						   mailBean.setDaysTimes((String)request.getParameter("hiddenDaysTimes")==null?"":request.getParameter("hiddenDaysTimes"));
						   mailBean.setDependencies((String)request.getParameter("hiddenDependencies")==null?"":request.getParameter("hiddenDependencies"));
						   mailBean.setBusNotification((String)request.getParameter("hiddenBusNotification")==null?"":request.getParameter("hiddenBusNotification"));
						   mailBean.setAudience((String)request.getParameter("hiddenAudience")==null?"":request.getParameter("hiddenAudience"));
						   mailBean.setFAQ((String)request.getParameter("hiddenFAQ")==null?"":request.getParameter("hiddenFAQ"));
						   mailBean.setNotes((String)request.getParameter("hiddenNotes")==null?"":request.getParameter("hiddenNotes"));
						   mailBean.setEscProcedure((String)request.getParameter("hiddenEscProcedure")==null?"":request.getParameter("hiddenEscProcedure"));
							// System.out.println("inside accept 4");
						   // Basic Details

						   mailBean.setObjName((String)request.getParameter("hiddenObjName")==null?"":request.getParameter("hiddenObjName"));
						   mailBean.setReleaseName((String)request.getParameter("hiddenRelName")==null?"":request.getParameter("hiddenRelName"));
						   mailBean.setObjType((String)request.getParameter("hiddenObjType")==null?"":request.getParameter("hiddenObjType"));
						   mailBean.setDBName((String)request.getParameter("hiddenDBName")==null?"":request.getParameter("hiddenDBName"));


							// System.out.println("inside accept 5");
							 try {

								Properties property = new Properties();
								File propfile = new File(getServletContext().getInitParameter("tracker.properties.home")+"/"+"STtracker.properties");
								InputStream in = new FileInputStream(propfile);
								property.load(in);
								sender = property.getProperty("RelMailSender")==null?"raman.kapil@db.com":property.getProperty("RelMailSender");

								mailserver = property.getProperty("MailServer");
								header= property.getProperty("CRAcceptHeader")==null?"@@ ALERT : Your CR has been accepted by CR Support Team @@":property.getProperty("CRAcceptHeader");


								MailClass mailclass= new MailClass(mailserver);
								StringBuffer content = new StringBuffer();
								
								
								String receive[] = dbutil.getContactsForCR(relObjKey);

								


								content.append("\n\t Your CR has been accepted by CR Support Team. Kindly find the detail information regarding the CR below. \t\t\t\t\t\t\t");
								content.append("\n\n\n");
								
								content.append("-------------- Basic Information -------------");

								content.append("\n\n\tCR Object Name : ");
								content.append(mailBean.getObjName());
								content.append("\n\tRelease Name : ");
								content.append(mailBean.getReleaseName());
								content.append("\n\tDB Name : ");
								content.append(mailBean.getDBName());
								content.append("\n\tObject Type : ");
								content.append(mailBean.getObjType());
								
								content.append("\n\n");

								content.append("------------ CR Related Information ----------");
							
								content.append("\n\n\tApp. Screen Name : ");
								content.append(mailBean.getAppScreenName());
								content.append("\n\n\tApp. Report Name : ");
								content.append(mailBean.getAppReportName());
								content.append("\n\n\tPurpose : ");
								content.append(mailBean.getPurpose());
								content.append("\n\n\tDays Times : ");
								content.append(mailBean.getDaysTimes());
								content.append("\n\n\tDependencies : ");
								content.append(mailBean.getDependencies());
								content.append("\n\n\tBusiness Notification : ");
								content.append(mailBean.getBusNotification());
								content.append("\n\n\tAudience : ");
								content.append(mailBean.getAudience());
								content.append("\n\n\tFAQ : ");
								content.append(mailBean.getFAQ());
								content.append("\n\n\tNotes : ");
								content.append(mailBean.getNotes());
								content.append("\n\n\tEsc. Procedure : ");
								content.append(mailBean.getEscProcedure());
								
								content.append("\n\n");

								content.append("\n\tComments By CR Support : ");
								content.append(reason);

								content.append("\n\n----------------------------------------------------------------------------------------------------------------");
								content.append("\n\n");
								content.append("\tSystem generated email, DO NOT REPLY.");
								content.append("\n\tKindly contact CR Support Team ( CR_MGMT@list.db.com ) for more assistance.");
																
								mailclass.postMail(receive,header,content.toString(),sender);
								%>
								<script>
									alert("Email sent to User/Contact Person regarding CR accepted.")
								</script>
								<%
							 }
							catch(Exception e)
							{

								System.out.println("Exception while sending mail :"+e);
								%>
								<script>
									alert("Error while sending Email.")
								</script>
								
								<%
							}
			

					
							//// changes for sending emails ends here


						}
			
			//		System.out.println("rejectButton >>"+rejectButton);
					if(rejectButton.equals("Reject")){
			//				System.out.println("inside reject >>"+relObjKey +reason+userid);
							// System.out.println("inside reject 1");

							dbutil.SaveCRBySupport(relObjKey, "N", reason, userid);

							session.removeAttribute("SEARCHED-CR-OBJECTS");
							RelObjSearchCRDetail = dbutil.getSearchedCRObjects(releaseName, crObjStatus);
							session.setAttribute("SEARCHED-CR-OBJECTS", RelObjSearchCRDetail);
							maxcrobj = RelObjSearchCRDetail.size();

						//// changes for sending emails starts here
							// System.out.println("inside reject 2");
							String sender ="";
							String mailserver="";
							String header ="";
											

						   ReleaseVO mailBean = new ReleaseVO();

						   // CR details
						  // System.out.println("inside reject 3"); 
						   mailBean.setAppScreenName((String)request.getParameter("hiddenAppScreenName")==null?"":request.getParameter("hiddenAppScreenName"));
						   
						   mailBean.setAppReportName((String)request.getParameter("hiddenAppReportName")==null?"":request.getParameter("hiddenAppReportName"));
						   
						   mailBean.setPurpose((String)request.getParameter("hiddenPurpose")==null?"":request.getParameter("hiddenPurpose"));
						   mailBean.setDaysTimes((String)request.getParameter("hiddenDaysTimes")==null?"":request.getParameter("hiddenDaysTimes"));
						   mailBean.setDependencies((String)request.getParameter("hiddenDependencies")==null?"":request.getParameter("hiddenDependencies"));
						   mailBean.setBusNotification((String)request.getParameter("hiddenBusNotification")==null?"":request.getParameter("hiddenBusNotification"));
						   mailBean.setAudience((String)request.getParameter("hiddenAudience")==null?"":request.getParameter("hiddenAudience"));
						   mailBean.setFAQ((String)request.getParameter("hiddenFAQ")==null?"":request.getParameter("hiddenFAQ"));
						   mailBean.setNotes((String)request.getParameter("hiddenNotes")==null?"":request.getParameter("hiddenNotes"));
						   mailBean.setEscProcedure((String)request.getParameter("hiddenEscProcedure")==null?"":request.getParameter("hiddenEscProcedure"));
							// System.out.println("inside reject 4");
						   // Basic Details

						   mailBean.setObjName((String)request.getParameter("hiddenObjName")==null?"":request.getParameter("hiddenObjName"));
						   mailBean.setReleaseName((String)request.getParameter("hiddenRelName")==null?"":request.getParameter("hiddenRelName"));
						   mailBean.setObjType((String)request.getParameter("hiddenObjType")==null?"":request.getParameter("hiddenObjType"));
						   mailBean.setDBName((String)request.getParameter("hiddenDBName")==null?"":request.getParameter("hiddenDBName"));


							// System.out.println("inside reject 5");
							 try {
								// System.out.println("inside reject 6");

								Properties property = new Properties();
								File propfile = new File(getServletContext().getInitParameter("tracker.properties.home")+"/"+"STtracker.properties");
								InputStream in = new FileInputStream(propfile);
								// System.out.println("inside reject 7");

								property.load(in);
								sender = property.getProperty("RelMailSender")==null?"raman.kapil@db.com":property.getProperty("RelMailSender");

								mailserver = property.getProperty("MailServer");
								header= property.getProperty("CRRejectHeader")==null?"@@ ALERT : Your CR has been rejected by CR Support Team @@":property.getProperty("CRRejectHeader");

								// System.out.println("inside reject 8");

								MailClass mailclass= new MailClass(mailserver);
								StringBuffer content = new StringBuffer();
								
								
								String receive[] = dbutil.getContactsForCR(relObjKey);


								// System.out.println("inside reject 9");


								content.append("\n\t Your requested CR has been rejected by CR Support Team, Kindly check the information below and update the required details from Release Manager webtool. \t\t\t\t\t\t\t");
								content.append("\n\n\n");
								
								content.append("-------------- Basic Information -------------");

								content.append("\n\n\tCR Object Name : ");
								content.append(mailBean.getObjName());
								content.append("\n\tRelease Name : ");
								content.append(mailBean.getReleaseName());
								content.append("\n\tDB Name : ");
								content.append(mailBean.getDBName());
								content.append("\n\tObject Type : ");
								content.append(mailBean.getObjType());
								
								content.append("\n\n");

								content.append("------------ CR Related Information ----------");
							
								content.append("\n\n\tApp. Screen Name : ");
								content.append(mailBean.getAppScreenName());
								content.append("\n\n\tApp. Report Name : ");
								content.append(mailBean.getAppReportName());
								content.append("\n\n\tPurpose : ");
								content.append(mailBean.getPurpose());
								content.append("\n\n\tDays Times : ");
								content.append(mailBean.getDaysTimes());
								content.append("\n\n\tDependencies : ");
								content.append(mailBean.getDependencies());
								content.append("\n\n\tBusiness Notification : ");
								content.append(mailBean.getBusNotification());
								content.append("\n\n\tAudience : ");
								content.append(mailBean.getAudience());
								content.append("\n\n\tFAQ : ");
								content.append(mailBean.getFAQ());
								content.append("\n\n\tNotes : ");
								content.append(mailBean.getNotes());
								content.append("\n\n\tEsc. Procedure : ");
								content.append(mailBean.getEscProcedure());
								
								content.append("\n\n");

								content.append("\n\tReason for Reject : ");
								content.append(reason);

								content.append("\n\n----------------------------------------------------------------------------------------------------------------");
								content.append("\n\n");
								content.append("\tSystem generated email, DO NOT REPLY.");
								content.append("\n\tKindly contact CR Support Team ( CR_MGMT@list.db.com ) for more assistance.");
								
								// System.out.println("inside reject 10");


								mailclass.postMail(receive,header,content.toString(),sender);
								%>
								<script>
									alert("Email sent to User/Contact Person regarding CR rejected.")
								</script>
								<%
								// System.out.println("inside reject 11");

							 }
							catch(Exception e)
							{

								System.out.println("Exception while sending mail :"+e);
								// System.out.println("inside reject 12");

								%>
								<script>
									alert("Error while sending Email.")
								</script>
								
								<%
							}
			

					
							//// changes for sending emails ends here
						}
			
					%>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="styles/tracker_style.css">
		<title>
			CR Object Support Maintenance. 
		</title>
		<script>
			function changeToNxtObject(obj1, obj2){
				//	alert("obj1 :"+obj1.value +" >> obj2"+obj2.value);
					var var1 = obj1.value ;
					var var2 = obj2.value-2 ;
					
					if(var1 > var2){
						obj1.value=0;
				//		document.EditCRForm.submit();
					}else{
						obj1.value++;
				//		document.EditCRForm.submit();
					}
					}

			function changeToPrvObject(obj1, obj2){
				//	alert("obj1 :"+obj1.value );
					var var1 = obj1.value ;
					
					if(var1 < 1){
						obj1.value=obj2.value-1;
				//		document.EditCRForm.submit();
					}else{
						obj1.value--;
				//		document.EditCRForm.submit();	
					}
					}	

			function editnewraw(obj1,obj2)
					{  

						var var1= obj1.value ;
						var var2= obj2.value-1 ;
						if(var1 < var2 ){
								obj1.value++;
								document.frmProject.submit(); 
						}
						else{
								// alert("max data");
								obj1.value=0;
						}
					}

			function enterReason(obj1, obj2, obj3){
					
					obj1.value = trim(obj1.value);
	
					if( obj1.value == 0){
						alert("Please enter reason for Reject.");
						obj1.focus();
						return false;
					 }else{
						changeToNxtObject(obj2, obj3);	
					 }

				}

			function trim(sString)
			{
				sTrimmedString = "";
			   if (sString != "") {
				  var iStart = 0;
				  var iEnd = sString.length - 1;	
				  // var sWhitespace = " \t\f\n\r\v";
				  var sWhitespace = "   ";
		
	
				  while (sWhitespace.indexOf(sString.charAt(iStart)) != -1) {
				  iStart++;
				  if (iStart > iEnd) 
					break;
			   }

			  // If the string not just whitespace
			  if (iStart <= iEnd) {
				 while (sWhitespace.indexOf(sString.charAt(iEnd)) != -1)
					iEnd--;
				 sTrimmedString = sString.substring(iStart,++iEnd);
			  }
		   }
		   return sTrimmedString;
		 }

		</script>
	</head>

	<body>


		<form name="CRSupportRelease" method="post">
			<table width=100%>
				<tr>
					<td width=100%>
						<jsp:include page="HeaderNav_ReleaseObject.jsp" />
					</td>
				</tr>
			</table>
		</form>

		<a href="mainpage.jsp">Back to Main Page</a>
	

		<form name="SearchCRObjects" action="SupportCRDetail.jsp" method="post">
				<table cellpadding="0" cellspacing="1" width="80%" style="BORDER:#000000 1px solid" colspan=5 align=center>
					<tr bgcolor=#EFEFEF>
						<td class=bodyblue align=center>
							<b>
								Release Name
							</b>
						</td>
					
						<td class=bodyblue align=center>
							<select name=releaseName>
								<%for (int i = 0; i < relNameVector.size(); i++) {
									ReleaseVO relbean = (ReleaseVO) relNameVector.elementAt(i);
									%>

								<option value='<%=	relbean.getReleaseName()%>' <%= releaseName.equals(relbean.getReleaseName())?"selected":""%>>
								<%=relbean.getReleaseName()%>
								</option>

								<%} %>
							</select>
						</td>
						
						<td class=bodyblue align=center>
							<b>
								CR Object Status
							</b>
						</td>

						<td class=bodyblue align=center>
							<select name=crObjStatus>
								<option value='ALL' <%= crObjStatus.equals("ALL")?"selected":""%>>- ALL -</option>
								<option value='O' <%= crObjStatus.equals("O")?"selected":""%>>Open</option>
								<option value='Y' <%= crObjStatus.equals("Y")?"selected":""%>>Accepted</option>
								<option value='N' <%= crObjStatus.equals("N")?"selected":""%>>Rejected</option>
							</select>
						</td>
					
						<td align=center>
							<input type=submit class=whitebutton name=searchButton value=Search onclick="submit()">
						</td>
		
					</tr>
				</table>

<%			//		System.out.println(">>1 >>>> RelObjSearchCRDetail.size()"+RelObjSearchCRDetail.size());

					if(RelObjSearchCRDetail==null){
					
						RelObjSearchCRDetail = (Vector)session.getAttribute("SEARCHED-CR-OBJECTS");
					
			//			System.out.println(">>2 >>>> RelObjSearchCRDetail.size()"+RelObjSearchCRDetail.size());
						if(RelObjSearchCRDetail!=null){
							maxcrobj = RelObjSearchCRDetail.size();
						}
					
					}
%>
		<table cellpadding="0" cellspacing="1" >
				<tr>
					<td> &nbsp
					</td>
				</tr>
		</table>

<%
				
					if(RelObjSearchCRDetail!=null) {
						
						if(RelObjSearchCRDetail.size()>0){
						
						crobjbean = (ReleaseVO)RelObjSearchCRDetail.elementAt(crobjkey);
						

%>			

			
		</form>				
		
		<form name="EditCRForm" action="SupportCRDetail.jsp" method="post">
			
			<input type=hidden name="hiddencrObjStatus" value="<%=crObjStatus%>">			
			<input type=hidden name="hiddenObjName" value="<%=crobjbean.getObjName()%>">
			<input type=hidden name="hiddenRelName" value="<%=crobjbean.getReleaseName()%>">
			<input type=hidden name="hiddenUserUpdated" value="<%=crobjbean.getUserUpdated()%>">
			<input type=hidden name="hiddenContactPerson" value="<%=crobjbean.getContactPerson()%>">
			<input type=hidden name="hiddenObjType" value="<%=crobjbean.getObjType()%>">
			<input type=hidden name="hiddenDBName" value="<%=crobjbean.getDBName()%>">
			<input type=hidden name="hiddenAppScreenName" value="<%= crobjbean.getAppScreenName() %>">
			<input type=hidden name="hiddenAppReportName" value="<%= crobjbean.getAppReportName() %>">
			<input type=hidden name="hiddenPurpose" value="<%= crobjbean.getPurpose() %>">
			<input type=hidden name="hiddenDaysTimes" value="<%= crobjbean.getDaysTimes() %>">
			<input type=hidden name="hiddenDependencies" value="<%= crobjbean.getDependencies() %>">
			<input type=hidden name="hiddenBusNotification" value="<%= crobjbean.getBusNotification() %>">
			<input type=hidden name="hiddenAudience" value="<%= crobjbean.getAudience() %>">
			<input type=hidden name="hiddenFAQ" value="<%= crobjbean.getFAQ() %>">
			<input type=hidden name="hiddenNotes" value="<%= crobjbean.getNotes() %>">
			<input type=hidden name="hiddenEscProcedure" value="<%= crobjbean.getEscProcedure() %>">


			<table cellpadding="1" cellspacing="1" width="80%" style="BORDER:#000000 1px solid" colspan=4 align=center>
			
				<tr bgcolor="#000077" >
					<td class=smallfonthead colspan=3 align=left width=75%><b>Release Object Basic Information.</b></td>				
					<td class=smallfonthead colspan=1 width=25%><b><%=crobjkey+1%>&nbsp of &nbsp<%=maxcrobj%></b></td>				
				</tr>




				<tr bgcolor=#EFEFEF>
					<td class = bodyblue align=right colspan=1 width=30%><b> Object Name&nbsp&nbsp&nbsp&nbsp</b></td>
					<td class = bodyblue colspan=3 width=70%><%=crobjbean.getObjName()%></td>
				</tr>

				<tr bgcolor=#EFEFEF>
					<td class = bodyblue align=right colspan=1 width=30%><b> Object Type&nbsp&nbsp&nbsp&nbsp</b></td>
					<td class = bodyblue colspan=3 width=70%><%=crobjbean.getObjType()%></td>
				</tr>

				<tr bgcolor=#EFEFEF>
					<td class = bodyblue align=right colspan=1 width=30%><b> Object Database&nbsp&nbsp&nbsp&nbsp</b></td>
					<td class = bodyblue colspan=3 width=70%><%=crobjbean.getDBName()%></td>
				</tr>

				<tr bgcolor=#EFEFEF>
					<td class = bodyblue align=right colspan=1 width=30%><b> Release Name&nbsp&nbsp&nbsp&nbsp</b></td>
					<td class = bodyblue colspan=3 width=70%><%=crobjbean.getReleaseName()%></td>
				</tr>

				<tr bgcolor=#EFEFEF>
					<td class = bodyblue align=right colspan=1 width=30%><b> User&nbsp&nbsp&nbsp&nbsp</b></td>
					<td class = bodyblue colspan=3 width=70%><%=crobjbean.getUserUpdated()%></td>
				</tr>

				<tr bgcolor=#EFEFEF>
					<td class = bodyblue align=right colspan=1 width=30%><b> Contact Person&nbsp&nbsp&nbsp&nbsp</b></td>
					<td class = bodyblue colspan=3 width=70%><%=crobjbean.getContactPerson()==null?"":crobjbean.getContactPerson()%></td>
				</tr>
			
				<input type=hidden name=relObjKey value='<%=crobjbean.getReleaseObjKey()%>'>

				<tr bgcolor="#000077" >
					<td class=smallfonthead colspan=4 align=left><b> Release Object - CR Related Details</b></td>				
				</tr>
				<tr bgcolor=#EFEFEF>
					<td class = bodyblue align=right colspan=1 width=30%><b> App. Screen / Functionality Name&nbsp&nbsp&nbsp&nbsp</b></td>
					<td class = bodyblue colspan=3 width=70%><%= crobjbean.getAppScreenName()== null?"": crobjbean.getAppScreenName()%></td>
				</tr>

				<tr bgcolor=#EFEFEF>
					<td class = bodyblue align=right colspan=1 width=30%><b> App. Report&nbsp&nbsp&nbsp&nbsp</b></td>
					<td class = bodyblue colspan=3 width=70%><%= crobjbean.getAppReportName()== null?"": crobjbean.getAppReportName()%></td>
				</tr>

				<tr bgcolor=#EFEFEF>
					<td class = bodyblue align=right colspan=1 width=30%><b> Purpose of Functionality&nbsp&nbsp&nbsp&nbsp</b></td>
					<td class = bodyblue colspan=3 width=70%><%= crobjbean.getPurpose()== null?"": crobjbean.getPurpose()%></td>
				</tr>
				
				<tr bgcolor=#EFEFEF>
					<td class = bodyblue align=right colspan=1 width=30%><b> Days/Times Of Operation&nbsp&nbsp&nbsp&nbsp</b></td>
					<td class = bodyblue colspan=3 width=70%><%= crobjbean.getDaysTimes()== null?"": crobjbean.getDaysTimes()%> </td>
				</tr>

				<tr bgcolor=#EFEFEF>
					<td class = bodyblue align=right colspan=1 width=30%><b> Dependencies&nbsp&nbsp&nbsp&nbsp</b></td>
					<td class = bodyblue colspan=3 width=70%><%= crobjbean.getDependencies()== null?"": crobjbean.getDependencies()%></td>
				</tr>

				<tr bgcolor=#EFEFEF>
					<td class = bodyblue align=right colspan=1 width=30%><b> Business Notifications&nbsp&nbsp&nbsp&nbsp</b></td>
					<td class = bodyblue colspan=3 width=70%><%= crobjbean.getBusNotification()== null?"": crobjbean.getBusNotification()%></td>
				</tr>
				
				<tr bgcolor=#EFEFEF>
					<td class = bodyblue align=right colspan=1 width=30%><b> Audience&nbsp&nbsp&nbsp&nbsp</b></td>
					<td class = bodyblue colspan=3 width=70%><%= crobjbean.getAudience()== null?"": crobjbean.getAudience()%></td>
				</tr>

				<tr bgcolor=#EFEFEF>
					<td class = bodyblue align=right colspan=1 width=30%><b> FAQ&nbsp&nbsp&nbsp&nbsp</b></td>
					<td class = bodyblue colspan=3 width=70%><%= crobjbean.getFAQ()== null?"": crobjbean.getFAQ()%></td>
				</tr>


				<tr bgcolor=#EFEFEF>
					<td class = bodyblue align=right colspan=1 width=30%><b> Notes&nbsp&nbsp&nbsp&nbsp</b></td>
					<td class = bodyblue colspan=3 width=70%><%= crobjbean.getNotes()== null?"": crobjbean.getNotes()%></td>
				</tr>

				<tr bgcolor=#EFEFEF>
					<td class = bodyblue align=right colspan=1 width=30%><b> Escalation Procedure&nbsp&nbsp&nbsp&nbsp</b></td>
					<td class = bodyblue colspan=3 width=70%><%= crobjbean.getEscProcedure()== null?"": crobjbean.getEscProcedure()%></td>
				</tr>

				<%
				String ValidStatus = "";		
				if(crobjbean.getValid().equals("Y")){
					ValidStatus = "Accepted";
				}else if(crobjbean.getValid().equals("N")){
					ValidStatus = "Rejected";
				}else{
					ValidStatus = "Open";
				}
				
				%>
			
				<tr bgcolor=#EFEFEF>
					<td class = bodyblue align=right colspan=1 width=30%><b> Current CR Status&nbsp&nbsp&nbsp&nbsp</b></td>
					<td class = bodyblue colspan=3 width=70%><%= ValidStatus %></td>
				</tr>
	
				<tr bgcolor=#EFEFEF>
					<td class = bodyblue align=right colspan=2>&nbsp</td>
					<td class = bodyblue align=right colspan=2>&nbsp</td>
				</tr>


				<tr bgcolor=#EFEFEF>
					<td class = bodyblue align=right colspan=1 width=30%><b> Reason / Comments&nbsp&nbsp&nbsp&nbsp</b></td>
					<td class = bodyblue colspan=3 width=70%><input type=text name=reason size="50" value=`<%= crobjbean == null?"": crobjbean.getReason()==null?"":crobjbean.getReason()%>`> </td>
				</tr>

				<tr bgcolor=#EFEFEF>
					<td class = bodyblue align=right colspan=2>&nbsp</td>
					<td class = bodyblue align=right colspan=2>&nbsp</td>
				</tr>

				<tr bgcolor=#EFEFEF>
									
					<input type=hidden name=crobjkey value='<%=crobjkey%>'>
					<input type=hidden name=maxcrobj value='<%=maxcrobj%>'>
					<input type=hidden name=releaseName value='<%=releaseName%>'>

					<td colspan=1 align=left>
						<input type=submit class=whitebutton name=prvButton value="Prev Object" onclick="changeToPrvObject(document.EditCRForm.crobjkey, document.EditCRForm.maxcrobj)">
					</td>
					
					<td colspan=1 align=center>
						<input type=submit class=whitebutton name=acceptButton value="Accept" onclick="changeToNxtObject(document.EditCRForm.crobjkey, document.EditCRForm.maxcrobj)"
						<%if("Y".equals(crobjbean.getValid())){
								out.println("disabled"); 
							}
						%>>
					</td>

					<td colspan=1 align=center>
						<input type=submit class=whitebutton name=rejectButton value="Reject" onclick="return enterReason(document.EditCRForm.reason,document.EditCRForm.crobjkey, document.EditCRForm.maxcrobj)"
						<%if("N".equals(crobjbean.getValid())){
								out.println("disabled"); 
							}
						%>>
					</td>

					<td colspan=1 align=right>
						<input type=submit class=whitebutton name=nxtButton value="Next Object" onclick="changeToNxtObject(document.EditCRForm.crobjkey, document.EditCRForm.maxcrobj)">
					</td>

				
				</tr>

				<%} else {%>

			<table cellpadding="1" cellspacing="1" width="80%" style="BORDER:#000000 1px solid" colspan=4 align=center>
				<tr bgcolor="#000077" >
					<td class=smallfonthead colspan=4 align=center><b>CR Objects are not available for selected Criteria.</b></td>				
				</tr>
				<% } 
		
				}
			%>
			</table>
		</form>

			
	</body>
</html>

<%}
			} catch (Exception e) {
				e.printStackTrace();
			}

		%>
